<div class="add">
	<form action="<?php echo url('banner/add');?>" method="post" id="addForm">
		<table>
			<tr>
				<td align="right">banner分类:</td>
				<td align="left" class="magin">
					<select name="banner[typeID]">
						<option value="<?php echo service_type::BANNER;?>"><?php echo service_type::getName(service_type::BANNER);?></option>
						<option value="<?php echo service_type::SLIDE;?>"><?php echo service_type::getName(service_type::SLIDE);?></option>
					</select>
				</td>
			</tr>
			<tr>
				<td align="right">banner图片:</td>
				<td align="left" class="magin"><?php echo fetch('uploadImg');?></td>
			</tr>
			<tr>
				<td align="right">链接地址:</td>
				<td align="left" class="magin"><input type="text" name="banner[url]" rows="4" cols="100" /></td>
			</tr>
			<tr>
				<td colspan="2" align="right"><input type="submit" value="添加" id="catesub" /></td>
			</tr>
		</table>
	</form>
</div>
<script type="text/javascript">
$(document).ready(function(){	
	submitForm("#addForm",{
		dataType:'json',
		success:function(data){
				if(data.i=='ok'){
					location.href="<?php echo url('banner/index');?>";
				}else{
					alert(data.i);
				}
			},
	});
});
</script>
